/* 全局容器高度控制 */
html, body, #app {
  height: 100% !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* 布局容器样式 */
.el-container, .common-layout {
  height: 100%;
  overflow: hidden;
}

/* 特殊模式样式控制 */
.el-popup-parent--hidden {
  width: 100% !important;
}

.special-mode-active {
  body {
    overflow: hidden;
    height: 100%;
  }
}

.el-menu > .el-menu-item.is-active {
  position: relative;
  background-color: var(--el-menu-active-bg-color);

  i, span {
    color: var(--el-menu-active-lf-color);
  }
}

.el-menu > .el-menu-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--el-menu-active-lf-color);
}

/* 加过渡给侧边导航*/
.el-aside {
  transition: width 0.5s ease-in;
  -webkit-transition: width 0.5s;
  -moz-transition: width 0.5s;
  -o-transition: width 0.5s;
}

/*加快侧边栏文字消失的速度*/
.el-menu {
  transition: all 10ms;
}

/* 头部样式 */
.header {
  border-bottom: 1px solid var(--el-border-color);
  background: var(--el-header-bg-color);
  display: flex;
  align-items: center;
  font-size: 20px;

  .left-header {
    display: flex;
    align-items: center;

  }

  .left-header {
    margin-right: auto;
    display: flex;
    align-items: center;

    .collapse {
      margin-right: 16px;
      display: flex;
      align-items: center;
      cursor: pointer;
    }
  }

  .right-header {
    display: flex;
    align-items: center;

    .avatar-container {
      display: flex;
      align-items: center;
      cursor: pointer;
      padding: 0 8px;
      transition: background-color 0.3s;
      border-radius: 4px;
      margin-left: 16px;
    }

    .avatar-container:hover {
      background-color: var(--el-fill-color-light);
    }

    .header-icon {
      display: flex;
      align-items: center;

      > div {
        cursor: pointer;
        margin: 0 8px;
        transition: background-color 0.3s;
      }

      > div:hover {
        background-color: var(--el-fill-color-light);
      }
    }
  }
}

/************************************** 内容区域 **************************************/
//滚动条
.el-main::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.el-main::-webkit-scrollbar-thumb {
  background-color: rgba(144, 147, 153, 0.3);
  border-radius: 3px;
  transition: background-color .3s;
}

.el-main::-webkit-scrollbar-thumb:hover {
  background-color: rgba(144, 147, 153, 0.5);
}

.el-main::-webkit-scrollbar-track {
  background-color: transparent;
}

.el-main {
  background: var(--el-main-bg-color);

  .main-content {
    overflow: hidden;

    .card-box {
      background-color: var(--el-bg-color);
      border-radius: 5px;
      border: 1px solid var(--el-border-color-light);
      box-shadow: 0 0 12px #0000000d;
    }

    .table-card {
      padding: 20px;
    }

    .table-toolbar {
      display: flex;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .pagination-container {
      margin-top: 20px;
      display: flex;
      justify-content: flex-end;
    }
  }


}

.layout-box {
  display: flex;
  flex-wrap: wrap;
  column-gap: 36px;
  padding: 0 4px;

  .layout-item {
    position: relative;
    box-shadow: 0 0 5px 1px var(--el-border-color-dark);
    padding: 6px;
    width: 100px;
    height: 70px;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 20px;

  }

  .active {
    box-shadow: 0 0 0 2px var(--el-color-primary) !important;
  }

  .active-icon {
    position: absolute;
    font-size: 13px;
    right: 10px;
    bottom: 10px;
    color: var(--el-color-primary);
  }

  .layout-vertical {
    display: flex;
    justify-content: space-between;

    .layout-aside {
      width: 20%;
      background-color: var(--el-color-primary);
      border-radius: 3px;
    }

    .layout-container {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: 73%;

      .layout-header {
        height: 20%;
        background-color: var(--el-color-primary-light-5);
        border-radius: 3px;
      }

      .layout-content {
        height: 69%;
        background-color: var(--el-color-primary-light-8);
        border: 1px dashed var(--el-color-primary);
        border-radius: 3px;
      }
    }


  }

  .layout-classic {
    display: flex;
    justify-content: space-between;
    flex-direction: column;

    .layout-header {
      height: 20%;
      background-color: var(--el-color-primary-light-5);
      border-radius: 3px;
    }

    .layout-container {
      display: flex;
      justify-content: space-between;
      height: 69%;

      .layout-aside {
        width: 20%;
        background-color: var(--el-color-primary);
        border-radius: 3px;
      }

      .layout-content {
        background-color: var(--el-color-primary-light-8);
        border: 1px dashed var(--el-color-primary);
        border-radius: 3px;
        width: 73%;
      }
    }


  }

  .layout-transverse {
    display: flex;
    justify-content: space-between;
    flex-direction: column;

    .layout-header {
      height: 20%;
      background-color: var(--el-color-primary);
      border-radius: 3px;
    }

    .layout-content {
      height: 69%;
      background-color: var(--el-color-primary-light-8);
      border: 1px dashed var(--el-color-primary);
      border-radius: 3px;
    }
  }

  .layout-columns {
    display: flex;
    justify-content: space-between;

    .layout-header {
      width: 15%;
      background-color: var(--el-color-primary-light-5);
      border-radius: 3px;
    }

    .layout-aside {
      width: 15%;
      background-color: var(--el-color-primary);
      border-radius: 3px;
    }

    .layout-content {
      background-color: var(--el-color-primary-light-8);
      border: 1px dashed var(--el-color-primary);
      border-radius: 3px;
      width: 53%;
    }
  }
}

.setting-item {
  height: 40px;
  margin: 10px 0;
  padding: 0 5px;
  font-size: 14px;
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.el-drawer .el-drawer__header {
  padding: 16px 20px;
  height: 50px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--el-border-color-lighter);
}

.login-root {
  display: flex;
  height: 100vh;
  background-color: #f5f7fa;
  overflow: hidden;

  .illustration-section {
    flex: 1;
    background: linear-gradient(135deg, #1890ff, #36cfc9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;

    .bg-circle {
      position: absolute;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.1);
      animation: float 15s infinite ease-in-out;

      &.bg-circle:nth-child(1) {
        width: 300px;
        height: 300px;
        top: -100px;
        left: -100px;
        animation-delay: 0s;
      }

      &.bg-circle:nth-child(2) {
        width: 200px;
        height: 200px;
        bottom: -50px;
        right: -50px;
        animation-delay: 2s;
      }

      &.bg-circle:nth-child(3) {
        width: 150px;
        height: 150px;
        top: 30%;
        right: 20%;
        animation-delay: 4s;
      }
    }

    @keyframes float {
      0%, 100% {
        transform: translate(0, 0);
      }
      50% {
        transform: translate(20px, 20px);
      }
    }

    .illustration-container {
      position: relative;
      width: 80%;
      max-width: 500px;
      margin-bottom: 2rem;
      z-index: 2;

      .illustration {
        width: 100%;
        filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
      }

      .rocket {
        position: absolute;
        width: 60px;
        height: 60px;
        top: 20%;
        left: 15%;
        animation: rocketFly 8s infinite ease-in-out;
        transform-origin: center;
      }

      @keyframes rocketFly {
        0%, 100% {
          transform: translate(0, 0) rotate(0deg);
        }
        25% {
          transform: translate(50px, -20px) rotate(5deg);
        }
        50% {
          transform: translate(100px, 0) rotate(0deg);
        }
        75% {
          transform: translate(50px, 20px) rotate(-5deg);
        }
      }

      .data-point {
        position: absolute;
        width: 8px;
        height: 8px;
        background: white;
        border-radius: 50%;
        opacity: 0;
        animation: dataFlow 6s infinite linear;

        &:nth-child(1) {
          top: 45%;
          left: 30%;
          animation-delay: 0s;
        }

        &:nth-child(2) {
          top: 60%;
          left: 40%;
          animation-delay: 1s;
        }

        &:nth-child(3) {
          top: 35%;
          left: 50%;
          animation-delay: 2s;
        }

        &:nth-child(4) {
          top: 50%;
          left: 60%;
          animation-delay: 3s;
        }
      }

      @keyframes dataFlow {
        0% {
          transform: translateX(0);
          opacity: 0;
        }
        10% {
          opacity: 1;
        }
        90% {
          opacity: 1;
        }
        100% {
          transform: translateX(100px);
          opacity: 0;
        }
      }
    }

    .illustration-title {
      font-size: 2rem;
      font-weight: 600;
      margin-bottom: 1rem;
      text-align: center;
      position: relative;
      z-index: 2;
      animation: fadeInUp 1s ease-out;
    }

    .illustration-subtitle {
      font-size: 1rem;
      opacity: 0.8;
      text-align: center;
      max-width: 400px;
      position: relative;
      z-index: 2;
      animation: fadeInUp 1s ease-out 0.3s forwards;
      opacity: 0;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
  }

  .login-section {
    width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 3rem;
    background-color: white;
    position: relative;
    z-index: 1;

    .login-header {
      margin-bottom: 2rem;
      text-align: center;

      .login-title {
        font-size: 1.8rem;
        color: #333;
        margin-bottom: 0.5rem;
      }

      .login-subtitle {
        color: #666;
        font-size: 0.9rem;
      }
    }

    .login-el-form {
      margin-top: 1.5rem;

      .form-input {
        font-size: 0.95rem;
        color: #222;
      }

      :deep(.el-input__inner) {
        color: #222;
      }
    }

    .remember-forgot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.5rem;
      font-size: 0.85rem;

      .forgot-password {
        color: #1890ff;
        text-decoration: none;
        transition: color 0.3s;

        &:hover {
          color: #40a9ff;
        }
      }
    }

    .login-button {
      width: 100%;
      padding: 0.75rem;
      background-color: #1890ff;
      color: white;
      border: none;
      border-radius: 4px;
      font-size: 1rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s;
      position: relative;
      overflow: hidden;

      &:hover {
        background-color: #40a9ff;
      }
    }

    .login-footer {
      margin-top: 1.5rem;
      text-align: center;
      font-size: 0.85rem;
      color: #666;

      .register-link {
        color: #1890ff;
        text-decoration: none;
        margin-left: 0.5rem;
        transition: color 0.3s;

        &:hover {
          color: #40a9ff;
        }
      }
    }
  }

  @media (max-width: 768px) {
    flex-direction: column;
    .illustration-section {
      display: none;
    }
    .login-section {
      width: 100%;
      padding: 2rem;
    }
  }
}